package com.weishaoying.rws.aspect;

/**
 * @author WeiShaoying
 * @date 2018/5/5
 */
public class DataSourceHolder {

    //保证线程安全
    private static final ThreadLocal<String> THREAD_LOCAL = new ThreadLocal<>();


    public static void putDataSource(String datasource) {
        THREAD_LOCAL.set(datasource);
    }

    public static String getDataSource() {
        return THREAD_LOCAL.get();
    }
}
